//
// itertool - a polynormial and type-safe iterator framework in C++.
//
// Copyright (c) 2021-2025 Feng Cong
//
// Distributed under the MIT Software License
// See accompanying file LICENSE.txt or copy at
// https://opensource.org/licenses/MIT

#include <itertool/iter/empty.h>

#include "itertool_test.h"

TEST_CASE("EmptyIterable") {
  auto e = itertool::Empty<char>();
  CHECK(e.IsFinite());
  CHECK(e.IsResetable());
  CHECK_FALSE(e.HasNext());
  SUBCASE("range-based loop") {
    int i = 0;
    for (auto ch : e) {
      ++i;
    }
    CHECK_EQ(i, 0);
  }
}
